# Maintainer: David Runge <dvzrv@archlinux.org>

_name=pyalsa
pkgname=python-pyalsa
pkgver=1.2.7
pkgrel=4
pkgdesc="Python binding for the ALSA library"
arch=(loong64 x86_64)
url="https://www.alsa-project.org"
license=(LGPL2.1)
depends=(
  alsa-lib
  glibc
  python
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=(https://www.alsa-project.org/files/pub/$_name/$_name-$pkgver.tar.bz2{,.sig})
sha512sums=('126501fe7b9c006f28e9290bdd3ad907ea9e053b71e21e2c6f0b0beeecdba07b4b557014041b03452f96be690f59f2e647e075487ee87054f21f66df7f39b34b'
            'SKIP')
b2sums=('c100d16bd8c0d9fc6eddcda360f3582c55ed1b143a58a49caf76a62494882952d311271941ce0ecdf57ac934f3564dc922c80e8a5f5742b593341ff4215b700c'
        'SKIP')
validpgpkeys=(F04DF50737AC1A884C4B3D718380596DA6E59C91)  # ALSA Release Team (Package Signing Key v1) <release@alsa-project.org>

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
